package JLB_Chapter_02;

public class code_02_02 {
    public static void main(String[] args) {
        //int类型变量
        int x = 5;
        int y = -5;
        int z = x - y;
        System.out.println(z);
        //byte类型变量
        byte a = 19;
        byte b = 5;
        byte c = 19 - 5;
        //short类型变量
        short m = 5;
        short n = 7;
        //long类型变量
        long number = 1564564565L;
        long num = 4564545L;
        /*
        当进行算数运算时，short,byte类型会自动转成int类型进行计算
        如果是long类型，由于计算精度比int类型高，则不会进行强制类型转换
         */
        int k = m + n;
        int d = a + b +c;
        long sum = number + num;
        System.out.println(d);
        System.out.println(k);
        System.out.println(sum);
    }
}
